{% extends 'layout.html' %}
{% block content %}
    <h5 class="font-weight-bold">Dashboard</h5>
    <div class="border-top pt-3"></div>
    <div class="card mt-3">
        <h6 class="card-header font-weight-bold text-primary">Docker Engine - Community</h6>
        <div class="row text-center">
            <div class="col-md-auto text-center">
                <div class="card-body">
                    <h7 class="card-title font-weight-bold">Docker Version</h7>
                    <p class="card-text">{{ dockerinfo.get('Version') }}</p>
                </div>
            </div>
            <div class="col-md-auto text-center">
                <div class="card-body">
                    <h7 class="card-title font-weight-bold">API Version</h7>
                    <p class="card-text">{{ dockerinfo.get('ApiVersion') }}</p>
                </div>
            </div>
            <div class="col-md-auto text-center">
                <div class="card-body">
                    <h7 class="card-title font-weight-bold">OS</h7>
                    <p class="card-text">{{ dockerinfo.get('Os') }} - {{ dockerinfo.get('Arch') }}</p>
                </div>
            </div>
            <div class="col-md-auto text-center">
                <div class="card-body">
                    <h7 class="card-title font-weight-bold">Kernel Version</h7>
                    <p class="card-text">{{ dockerinfo.get('KernelVersion') }}</p>
                </div>
            </div>
            <div class="col-md-auto text-center">
                <div class="card-body">
                    <h7 class="card-title font-weight-bold">CPU Core</h7>
                    <p class="card-text">{{ cpu.get('count') }}</p>
                </div>
            </div>
            <div class="col-md-auto text-center">
                <div class="card-body">
                    <h7 class="card-title font-weight-bold">RAM</h7>
                    <p class="card-text">{{ ram }}</p>
                </div>
            </div>
        </div>
    </div>
    <!--CARD DECK-->
    <div class="container bg-light mt-5">
        <div class="card-deck mb-3 text-center pt-3">

            <div class="card mb-4 box-shadow">
                <div class="card-header">
                    <h4 class="my-0 font-weight-normal">Images</h4>
                </div>
                <div class="card-body">
                    <h1 class="card-title pricing-card-title">{{ image_count }}</h1>
                    <a href="{{ url_for('images') }}">
                        <button type="button" class="btn btn-lg btn-block btn-primary">Refresh</button>
                    </a>
                </div>
            </div>

            <div class="card mb-4 box-shadow">
                <div class="card-header">
                    <h4 class="my-0 font-weight-normal">Containers</h4>
                </div>
                <div class="card-body">
                    <h1 class="card-title pricing-card-title">{{ container_count }}</h1>
                    <a href="{{ url_for('containers') }}">
                        <button type="button" class="btn btn-lg btn-block btn-primary">Refresh</button>
                    </a>
                </div>
            </div>

            <div class="card mb-4 box-shadow">
                <div class="card-header">
                    <h4 class="my-0 font-weight-normal">Volumes</h4>
                </div>
                <div class="card-body">
                    <h1 class="card-title pricing-card-title">{{ volume_count }}</h1>
                    <a href="{{ url_for('volumes') }}">
                        <button type="button" class="btn btn-lg btn-block btn-primary">Refresh</button>
                    </a>
                </div>
            </div>

            <div class="card mb-4 box-shadow">
                <div class="card-header">
                    <h4 class="my-0 font-weight-normal">Networks</h4>
                </div>
                <div class="card-body">
                    <h1 class="card-title pricing-card-title">{{ network_count }}</h1>
                    <a href="{{ url_for('networks') }}">
                        <button type="button" class="btn btn-lg btn-block btn-primary">Refresh</button>
                    </a>
                </div>
            </div>
        </div>
    </div>
{% endblock content %}